import { stringify } from 'qs';
import request from '@/utils/request';
import webpath from '@/utils/webpath';


export async function deleteByPrimaryKeyForProUserGroup(params = {}) {
    return request(`/${webpath}/web/api/service/prousergroup/delete?${stringify(params)}`);
}


export async function selectByPrimaryKeyForProUserGroup(params = {}) {
    return request(`/${webpath}/web/api/service/prousergroup/get?${stringify(params)}`);
}


export async function insertForProUserGroup(params = {}) {
    return request(`/${webpath}/web/api/service/prousergroup/insert`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function updateForProUserGroup(params = {}) {
    return request(`/${webpath}/web/api/service/prousergroup/update`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function deleteByMapForProUserGroup(params = {}) {
    return request(`/${webpath}/web/api/service/prousergroup/deleteByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateByMapForProUserGroup(params = {}) {
    return request(`/${webpath}/web/api/service/prousergroup/updateByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function getOneForProUserGroup(params = {}) {
    return request(`/${webpath}/web/api/service/prousergroup/getOne`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}



export async function getAllForProUserGroup(params = {}) {
    return request(`/${webpath}/web/api/service/prousergroup/getAll`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function queryPageForProUserGroup(params = {}) {
    return request(`/${webpath}/web/api/service/prousergroup/queryPage`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function countForProUserGroup(params = {}) {
    return request(`/${webpath}/web/api/service/prousergroup/count`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

export async function insertBatchForProUserGroup(params = {}) {
    return request(`/${webpath}/web/api/service/prousergroup/insertBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function deleteBatchForProUserGroup(params = {}) {
    return request(`/${webpath}/web/api/service/prousergroup/deleteBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateBatchForProUserGroup(params = {}) {
    return request(`/${webpath}/web/api/service/prousergroup/updateBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}

export async function getPageProUserByGroupId(params = {}) {
    return request(`/${webpath}/web/api/service/prousergroup/getPageProUserByGroupId`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

export async function queryPageForProGroup(params = {}) {
    return request(`/${webpath}/web/api/service/progroup/queryPage`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

export async function queryPageForProUserChild(params = {}) {
    return request(`/${webpath}/web/api/service/prouser/queryPage`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

export async function getSelectedProUserByGroupId(params = {}) {
    return request(`/${webpath}/web/api/service/prousergroup/getSelectedProUserByGroupId`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}